package com.graph;

import java.awt.Color;
import java.awt.Graphics;
import java.io.Serializable;

public class Circle extends AbstractShape{
	static public double area(double r) {
 		double area =  3.14 * r *r;
		return area;
 	}
	static public String getChineseNameForCircle() {
 		return "Բ";
 	}
	
	


	public double radius;



	public Circle(Point center, double r) {
		super(center);
		radius = r;
		
	}
	@Override
	public double area(){
		double area =  3.14 * radius *radius;
		return area;
	}


	public double getRadius() {
		return radius;
	}

	
	
	public void setName(String name) {
		this.name = name;
	}
	
 	public void setRadius(double radius) {
		this.radius = radius;
	}
	public String getName() {
		// TODO Auto-generated method stub
		return null;
	}
	public void paint(Graphics g) {
		Circle c =this;
		int lux = (int) (c.getCenter().x - c.radius);
		int luy = (int) (c.getCenter().y - c.radius);
		g.setColor(Color.gray);
		g.drawOval(lux,  luy, (int)c.radius * 2, (int)c.radius * 2);
		g.setColor(Color.CYAN);
		g.fillOval(lux,  luy, (int)c.radius * 2, (int)c.radius * 2);
		
	}
 	

 	
 	

}